package chap3;
import java.util.Scanner;
public class Task7 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入4位会员卡号:");
        int a = input.nextInt();
        int b1 = a % 10;
        int b2 = a % 100 / 10;
        int b3 = a % 1000 / 100;
        int b4 = a / 1000;
        int total = b1 + b2 + b3 + b4;
        if (total > 24) {
            System.out.println("恭喜您，您中奖了，奖品是彩电一台");
        } else if (total > 20) {
            System.out.println("恭喜您，您中奖了，奖品是电吹风一部");
        } else if (total > 16) {
            System.out.println("恭喜您，您中奖了，奖品是餐巾纸一包");
        } else {
            System.out.println("下次继续努力");
        }
    }
}
